/**
 * 
 */
package com.chh.mysso.client.controller;

import javax.servlet.http.HttpServletRequest;

import com.chh.mysso.common.utils.SSOConstant;
import com.chh.mysso.common.utils.SessionUtil;
import com.chh.mysso.domain.model.dto.AuthUserDTO;

/**
 * @author chh
 *
 */
public class BaseController {
	
	public void putLoginUser(HttpServletRequest request, AuthUserDTO user){
		SessionUtil.put(request, SSOConstant.LOGIN_USER, user);
	}

	public AuthUserDTO getLoginUser(HttpServletRequest request){
		AuthUserDTO user = (AuthUserDTO)request.getSession().getAttribute(SSOConstant.LOGIN_USER);
		return user;
	}
}
